package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ghost on 2018/6/8.
 */
@Entity
@Table(name = "ETL_ARRAY_CHAMBER_HST_V", schema = "EDALDR", catalog = "")
@IdClass(EtlArrayChamberHstVPK.class)
public class EtlArrayChamberHstV {
    private String stepId;
    private String glassId;
    private Date glassEndTime;
    private Date glassStartTime;
    private String productId;
    private String productVersion;
    private String lotId;
    private String equipId;
    private String subEquipId;
    private String pid;
    private String recipeId;
    private String linkkey;
    private String cstId;

    @Id
    @Column(name = "STEP_ID")
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Id
    @Column(name = "GLASS_ID")
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Id
    @Column(name = "GLASS_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassEndTime() {
        return glassEndTime;
    }

    public void setGlassEndTime(Date glassEndTime) {
        this.glassEndTime = glassEndTime;
    }

    @Basic
    @Column(name = "GLASS_START_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassStartTime() {
        return glassStartTime;
    }

    public void setGlassStartTime(Date glassStartTime) {
        this.glassStartTime = glassStartTime;
    }

    @Basic
    @Column(name = "PRODUCT_ID")
    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "PRODUCT_VERSION")
    public String getProductVersion() {
        return productVersion;
    }

    public void setProductVersion(String productVersion) {
        this.productVersion = productVersion;
    }

    @Basic
    @Column(name = "LOT_ID")
    public String getLotId() {
        return lotId;
    }

    public void setLotId(String lotId) {
        this.lotId = lotId;
    }

    @Id
    @Column(name = "EQUIP_ID")
    public String getEquipId() {
        return equipId;
    }

    public void setEquipId(String equipId) {
        this.equipId = equipId;
    }

    @Id
    @Column(name = "SUB_EQUIP_ID")
    public String getSubEquipId() {
        return subEquipId;
    }

    public void setSubEquipId(String subEquipId) {
        this.subEquipId = subEquipId;
    }

    @Basic
    @Column(name = "PID")
    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    @Basic
    @Column(name = "RECIPE_ID")
    public String getRecipeId() {
        return recipeId;
    }

    public void setRecipeId(String recipeId) {
        this.recipeId = recipeId;
    }

    @Basic
    @Column(name = "LINKKEY")
    public String getLinkkey() {
        return linkkey;
    }

    public void setLinkkey(String linkkey) {
        this.linkkey = linkkey;
    }

    @Basic
    @Column(name = "CST_ID")
    public String getCstId() {
        return cstId;
    }

    public void setCstId(String cstId) {
        this.cstId = cstId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayChamberHstV that = (EtlArrayChamberHstV) o;

        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (glassEndTime != null ? !glassEndTime.equals(that.glassEndTime) : that.glassEndTime != null) return false;
        if (glassStartTime != null ? !glassStartTime.equals(that.glassStartTime) : that.glassStartTime != null)
            return false;
        if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false;
        if (productVersion != null ? !productVersion.equals(that.productVersion) : that.productVersion != null)
            return false;
        if (lotId != null ? !lotId.equals(that.lotId) : that.lotId != null) return false;
        if (equipId != null ? !equipId.equals(that.equipId) : that.equipId != null) return false;
        if (subEquipId != null ? !subEquipId.equals(that.subEquipId) : that.subEquipId != null) return false;
        if (pid != null ? !pid.equals(that.pid) : that.pid != null) return false;
        if (recipeId != null ? !recipeId.equals(that.recipeId) : that.recipeId != null) return false;
        if (linkkey != null ? !linkkey.equals(that.linkkey) : that.linkkey != null) return false;
        if (cstId != null ? !cstId.equals(that.cstId) : that.cstId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = stepId != null ? stepId.hashCode() : 0;
        result = 31 * result + (glassId != null ? glassId.hashCode() : 0);
        result = 31 * result + (glassEndTime != null ? glassEndTime.hashCode() : 0);
        result = 31 * result + (glassStartTime != null ? glassStartTime.hashCode() : 0);
        result = 31 * result + (productId != null ? productId.hashCode() : 0);
        result = 31 * result + (productVersion != null ? productVersion.hashCode() : 0);
        result = 31 * result + (lotId != null ? lotId.hashCode() : 0);
        result = 31 * result + (equipId != null ? equipId.hashCode() : 0);
        result = 31 * result + (subEquipId != null ? subEquipId.hashCode() : 0);
        result = 31 * result + (pid != null ? pid.hashCode() : 0);
        result = 31 * result + (recipeId != null ? recipeId.hashCode() : 0);
        result = 31 * result + (linkkey != null ? linkkey.hashCode() : 0);
        result = 31 * result + (cstId != null ? cstId.hashCode() : 0);
        return result;
    }
}
